/*
 * Copyright (c) 2017-2021 duobaoyu, Inc. All rights reserved.<br/>
 * Unless required by applicable law or agreed to in writing, <br/>
 * Unauthorized use and distribution by any person or organization is prohibited.<br/>
 */
package com.shangsi.feignservice.fallbackfactory;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author dzd
 * @date 2021-12-26
 */
@Slf4j
@Component
public class PaymentFallbackFactory implements FallbackFactory<PaymentFeignService2> {
    @Override
    public PaymentFeignService2 create(Throwable throwable) {
        return new PaymentFeignService2() {
            @Override
            public String getPayment(Integer id) {
                log.info("getPayment失败+",throwable);
                return "失败失败失败";
            }
        };
    }
}
